package cn.monkey.family.data;

import cn.monkey.family.data.utils.ObjectUtil;

public interface DataMapper<D, T, V> {

    T toEntity(D d);

    V toVo(T t);

    default T merge(T old, T entity) {
        return ObjectUtil.mergeNoNullVal(old, entity);
    }
}
